import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "@/views/login";
import home from "@/views/home";
import bicycle from "@/views/bicycle";
import bicycleType from "@/views/bicycleType";

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    name:"login",
    component:login
  },
  {
    path:"/home",
    name:"home",
    component:home,
    children:[
      {
        path:"/bicycle",
        name:"bicycle",
        component:bicycle
      },
      {
        path:"/bicycleType",
        name:"bicycleType",
        component:bicycleType
      }
    ]
  }
]

const router = new VueRouter({
  mode:"history",
  routes
})

export default router
